package com.harunasan.carrental.api.serve.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.harunasan.carrental.api.common.domain.entity.BaseInitUserEntity;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单
 * </p>
 *
 * @author 梁毅
 * @since 2022-03-07 23:00:58
 */
@Getter
@Setter
@TableName("oms_order")
@ApiModel(value = "Order对象", description = "订单")
public class Order implements Serializable, BaseInitUserEntity {

    private static final long serialVersionUID = 1L;

    @TableId
    @ApiModelProperty("订单表主键")
    private Long orderId;

    @ApiModelProperty("订单编号")
    private String orderNumber;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("租户姓名")
    private String userRealName;

    @ApiModelProperty("租户身份证号")
    private String userIdCardNumber;

    @ApiModelProperty("租户手机号")
    private String userTelephone;

    @ApiModelProperty("车辆id")
    private Long carId;

    @ApiModelProperty("车辆名")
    private String carName;

    @ApiModelProperty("车牌号")
    private String carPlateNumber;

    @ApiModelProperty("车辆网点id")
    private Long storeId;

    @ApiModelProperty("车辆网点名称")
    private String storeName;

    @ApiModelProperty("订单状态（1预定、2出车、3还车、0取消）")
    private String status;

    @ApiModelProperty("支付方式（线下支付、微信支付、支付宝）")
    private String payType;

    @ApiModelProperty("折扣")
    private BigDecimal discount;

    @ApiModelProperty("支付金额")
    private BigDecimal payAmount;

    @ApiModelProperty("总金额")
    private BigDecimal totalAmount;

    @ApiModelProperty("出车时间")
    private LocalDateTime driveStartDate;

    @ApiModelProperty("还车时间")
    private LocalDateTime driveEndDate;

    @ApiModelProperty("租赁天数")
    private String driveDays;

    @ApiModelProperty("租赁小时数")
    private String driveHours;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建人标识[外键]")
    private Long createdId;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createdTime;

    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty("修改人标识[外键]")
    private Long updatedId;

    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty("修改时间")
    private LocalDateTime updatedTime;

    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty("删除人标识[外键]")
    private Long deletedId;

    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty("删除时间")
    private LocalDateTime deletedTime;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("是否删除")
    private Boolean isDeleted = false;


}
